package tsing.javase.thread.pool.pratice;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.concurrent.ThreadPoolExecutor;

/**
 * @Date 2024/1/26 15:39
 */
@Service
public class PoolPracticeService {

    // 注入
    @Autowired
    private ThreadPoolExecutor threadPool;

    public void usePoolMethod(){
        threadPool.execute(()-> System.out.println("线程池执行"));
    }
}
